<!DOCTYPE html>
<html>
<head>
    <title>CNeMAS Nas</title>
	<meta charset="utf-8">
	 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="product" content="Metro UI CSS Framework">
    <meta name="description" content="Simple responsive css framework">
    <meta name="author" content="Sergey S. Pimenov, Ukraine, Kiev">
    <meta name="keywords" content="js, css, metro, framework, windows 8, metro ui">

    <link href="css/metro-bootstrap.css" rel="stylesheet">
    <link href="css/metro-bootstrap-responsive.css" rel="stylesheet">
    <link href="css/iconFont.css" rel="stylesheet">
    <link href="css/docs.css" rel="stylesheet">
    <link href="js/prettify/prettify.css" rel="stylesheet">
	
	<link href="themes/js-image-slider.css" rel="stylesheet" type="text/css" />
    <script src="themes/js-image-slider.js" type="text/javascript"></script>
    <link href="themes/tooltip.css" rel="stylesheet" type="text/css" />
    <script src="themes/tooltip.js" type="text/javascript"></script>
    <link href="generic.css" rel="stylesheet" type="text/css" />
	<link href="themes/style.css" rel="stylesheet" type="text/css" />
	<link href="css/metro-bootstrap.css" rel="stylesheet">

    <!-- Load JavaScript Libraries -->
    <script src="js/jquery/jquery.min.js"></script>
    <script src="js/jquery/jquery.widget.min.js"></script>
    <script src="js/jquery/jquery.mousewheel.js"></script>
    <script src="js/prettify/prettify.js"></script>

    <!-- Metro UI CSS JavaScript plugins -->
    <script src="js/load-metro.js"></script>

    <!-- Local JavaScript -->
    <script src="js/docs.js"></script>
    <script src="js/github.info.js"></script>
	
    
    <script type="text/javascript">
	
        imageSlider.thumbnailPreview(function (thumbIndex) { return "<img src='images/thumb" + (thumbIndex + 1) + ".jpg' style='width:70px;height:44px;' />"; });
    </script>
</head>
<body>
    <div class="div1"><h2>CNeMAS Nas</h2>
	<h3>Computer & Network Equipment Management System Nasional</h3>
    </div>
	<table>
	<tr>
	<td>
    <div id="sliderFrame">
        <div id="slider">           
            <img src="images/logotelkom.jpg" alt="" />         
            <img src="images/work2.jpg" alt="" />
            <img src="images/work3.jpg" alt="" />
            <img src="images/work4.jpg" alt="" />
            <img src="images/work5.jpg" alt="" />
        </div>
        <!--<div style="display: none;">
            <div id="cap1">
                Welcome to <a href="http://www.menucool.com/">Menucool.com</a>.
            </div>
            <div id="cap2">
                <em>HTML</em> caption. Link to <a href="http://www.google.com/">Google</a>.
            </div>
        </div>-->
    </div>
	</td>
	<td>
	<div id="loginBox">
		<form method="post">
		<table>
		<tr>
		<td>Login</td>
		<td><input type="text" name="user" class="textboxt"></td>
		</tr>
		<tr>
		<td>Password</td>
		<td><input type="password" name="pwd" class="textboxt"></td>
		</tr>
		<tr>
		<td>User</td>
		<td>
		<select>
			<option value="pegawai">Pegawai</option>
			<option value="mitra">Mitra / TKM</option>
		</select>
		</td>
		</tr>
		<tr>
		<td>
		</br></br></br>
		
		
        <center><button class="button large primary" type="submit" name="submit" value="Submit"><a>Submit</a></button></center>
		</td>
		</tr>
		</table>
		<?php
		include 'connect.php';
		if(isset($_POST['submit'])){ 	
			$username=$_POST['user'];
			$password=$_POST['pwd'];
			//checkempty();
			$q=mysql_query("SELECT * FROM  `cnemas`.`akun`");
			while($baris=mysql_fetch_array($q)){
				if($username==$baris['username'] && $password==$baris['password']){
					echo "<meta http-equiv='refresh' content='0;url=admin.php?login=".$username."'>";	
					
				}
				else if($username<>$baris['username'] || $password<>$baris['password']){
					echo "Login atau password salah";
					
				}
				
			}
		}
		
		?>
		</form>
	</div>
	</td>
	</tr>
	</table>
</body>

<div class="container tertiary-text bg-dark fg-white" style="padding: 10px"><center>
                &copy; 2014, CNeMAS Nas By <a href="www.its.ac.id" class="fg-yellow">ITS</a> </center>
            </div>
</html>
